Fix Bug: startup error when /ramfs/ not exists

Brightcells 8 years ago
parent
commit
f620a639ea
1 changed files with 5 additions and 1 deletions
  1. 5 1
      startup.sh

+ 5 - 1
startup.sh

@@ -22,7 +22,11 @@ if [ "$oldversion" != "$version" ] && [ "$deldb" = "true" ]; then
22 22
 fi
23 23
 
24 24
 # Start Server
25
-nohup python main.py --port=8002 &>/ramfs/minipai2.log &
25
+if [ ! -d "/ramfs/"]; then
26
+    nohup python main.py --port=8002 &>/ramfs/minipai2.log &
27
+else
28
+    nohup python main.py --port=8002 &>/tmp/minipai2.log &
29
+fi
26 30
 
27 31
 # Change Current Directory
28 32
 cd -